import { useElementSize } from '@vueuse/core'
import { computed, ref } from 'vue'

export function useListPageTableHeight(offsetHeight = 119) {
  const tableBox = ref(null)

  const { height } = useElementSize(tableBox)
  const tableHeight = computed(() => {
    if (!height.value) return 580
    return height.value - offsetHeight
  })

  return {
    tableBox,
    tableHeight,
  }
}
